<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.ViewTecnicoUsinaTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:form>
                <p:growl id="messages" life="3000"/>
                
                <h:panelGroup id="messagePanel" styleClass="ajustaListaMensagemErro"  layout="block">
                    <h:messages errorStyle="color: red" infoStyle="color: green" layout="list"/>
                </h:panelGroup>

                <p:panel>
                    <f:facet name="header">
                        <h:outputText value="#{bundle.LegendTecnicoUsinaTitle}"></h:outputText>
                    </f:facet>
                    <h:panelGrid columns="2">
                        <h:outputText value="#{bundle.ViewTecnicoUsinaLabel_tusId}"/>
                        <h:outputText value="#{tecnicoUsinaController.selected.tusId}" title="#{bundle.ViewTecnicoUsinaTitle_tusId}"/>
                        <h:outputText value="#{bundle.ViewTecnicoUsinaLabel_tusUsiId}"/>
                        <h:outputText value="#{tecnicoUsinaController.selected.tusUsiId.usiNm}" title="#{bundle.ViewTecnicoUsinaTitle_tusUsiId}"/>
                        <h:outputText value="#{bundle.ViewTecnicoUsinaLabel_tusTecId}"/>
                        <h:outputText value="#{tecnicoUsinaController.selected.tusTecId.tecNm}" title="#{bundle.ViewTecnicoUsinaTitle_tusTecId}"/>
                    </h:panelGrid>
                    <br />
                    <p:commandButton id="deleteCommand"  onclick="confirmationDestroy.show()" value="#{bundle.ViewTecnicoUsinaDestroyLink}" type="button" icon="ui-icon-trash" /> &nbsp;
                    <p:commandButton ajax="false" action="Edit" value="#{bundle.ViewTecnicoUsinaEditLink}"/>&nbsp;                   
                    <p:commandButton ajax="false" action="#{tecnicoUsinaController.prepareList}" value="#{bundle.ViewTecnicoUsinaShowAllLink}" immediate="true"/>
                </p:panel>
                <p:confirmDialog id="confirmDestroy" message="#{bundle.MsgConfirmDestroy_message}" header="#{bundle.MsgConfirmDestroy_header}" severity="alert" widgetVar="confirmationDestroy">
                    <p:commandButton id="confirm" ajax="false" value="#{bundle.MsgDialog_confirmar}"  oncomplete="confirmationDestroy.hide();" action="#{tecnicoUsinaController.destroy}" />
                    <p:commandButton id="decline"  value="#{bundle.MsgDialog_cancelar}" update="messages" onclick="confirmationDestroy.hide()" type="button"/>
                </p:confirmDialog>

            </h:form>
            <br/> 
            <ui:include src="Lista.xhtml"/>

        </ui:define>
    </ui:composition>

</html>
